package io.renren.wechat.support;

import org.springframework.http.ResponseEntity;

public abstract class WechatResUtils {

    public static <T> boolean isSuccess(ResponseEntity<T> responseEntity) {
        if (!responseEntity.getStatusCode().is2xxSuccessful()) {
            final T entityBody = responseEntity.getBody();
            return null != entityBody;
        }

        return false;
    }
}
